package jehc.djshi.log.service.impl;

import jehc.djshi.common.util.ExceptionUtil;
import jehc.djshi.log.dao.XtOperateBusinessLogsDao;
import jehc.djshi.log.model.XtOperateBusinessLogs;
import jehc.djshi.log.service.XtOperateBusinessLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Desc 平台业务操作日志
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@Service
public class XtOperateBusinessLogsServiceImpl implements XtOperateBusinessLogsService {
	@Autowired
	private XtOperateBusinessLogsDao xtOperateBusinessLogsDao;
	/**
	* 分页
	* @param condition 
	* @return
	*/
	public List<XtOperateBusinessLogs> getXtOperateBusinessLogsListByCondition(Map<String,Object> condition){
		try{
			return xtOperateBusinessLogsDao.getXtOperateBusinessLogsListByCondition(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 查询对象
	* @param xt_operate_business_logs_id 
	* @return
	*/
	public XtOperateBusinessLogs getXtOperateBusinessLogsById(String xt_operate_business_logs_id){
		try{
			return xtOperateBusinessLogsDao.getXtOperateBusinessLogsById(xt_operate_business_logs_id);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
	}
	/**
	* 添加
	* @param xtOperateBusinessLogs
	* @return
	*/
	public int putXtOperateBusinessLogs(XtOperateBusinessLogs xtOperateBusinessLogs){
		int i = 0;
		try {
			i = xtOperateBusinessLogsDao.addXtOperateBusinessLogs(xtOperateBusinessLogs);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 修改
	* @param xtOperateBusinessLogs
	* @return
	*/
	public int updateXtOperateBusinessLogs(XtOperateBusinessLogs xtOperateBusinessLogs){
		int i = 0;
		try {
			i = xtOperateBusinessLogsDao.updateXtOperateBusinessLogs(xtOperateBusinessLogs);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
	/**
	* 删除
	* @param condition 
	* @return
	*/
	public int delXtOperateBusinessLogs(Map<String,Object> condition){
		int i = 0;
		try {
			i = xtOperateBusinessLogsDao.delXtOperateBusinessLogs(condition);
		} catch (Exception e) {
			throw new ExceptionUtil(e.getMessage(),e.getCause());
		}
		return i;
	}
}
